﻿CREATE PROCEDURE InsertRows(
	 @InventoryNumber nvarchar(8),
	 @Weight nvarchar(3),
	 @Destination nvarchar(5),
	 @GoodCode nvarchar(5),
	 @ReceiverCode nvarchar(4), 
	 @ParkType nvarchar(2), 
	 @StartStation nvarchar(5), 
	 @OperationCode nvarchar(2), 
	 @OperationDate nvarchar(4), 
	 @OperationYear nvarchar(2),
	 @OperationTime nvarchar(4), 
	 @StationOfOperation nvarchar(5), 
	 @DeliveryRoad nvarchar(2), 
	 @ReceptionRoad nvarchar(2), 
	 @CoachIndex nvarchar(13), 
	 @CoachNumber nvarchar(4),
	 @DestinationFK nvarchar(7),
	 @GoodCodeFK nchar(5),
	 @ReceiverCodeFK nchar(4),
	 @StartStationFK nvarchar(7),
	 @OperationCodeFK nchar(2),
	 @StationOfOperationFK nvarchar(7),
	 @DeliveryRoadFK nvarchar(50),
	 @ReceptionRoadFK nvarchar(50) )
AS
BEGIN 
	INSERT INTO CoachDB ( Inventory_Number,Cargo_Weight,Destination,Good_Code,Receiver_Code,Park_Type,Start_Station,Operation_Code,Operation_Data,Operation_Year,Operation_Time,Station_Of_Operation,Delivery_Road,Reception_Road,Coach_Index,Coach_Number,Destionation_FK,Good_Code_FK,Receiver_Code_FK,Start_Station_FK,Operation_Code_FK,Station_Of_Operation_FK,Delivery_Road_FK,Reception_Road_FK)
    values ( @InventoryNumber,@Weight,@Destination,@GoodCode,@ReceiverCode, @ParkType, @StartStation, @OperationCode, @OperationDate, @OperationYear,@OperationTime, @StationOfOperation, @DeliveryRoad, @ReceptionRoad, @CoachIndex, @CoachNumber,@DestinationFK,@GoodCodeFK,@ReceiverCodeFK,@StartStationFK,@OperationCodeFK,@StationOfOperationFK,@DeliveryRoadFK,@ReceptionRoadFK)
END